﻿namespace TimeManagement.DataAccess
{
    using Models;
    using System.Collections.Generic;
    using System.Data.Entity;

    public class TimeManagementSeeder : DropCreateDatabaseIfModelChanges<TimeManagementContext>
    {
        protected override void Seed(TimeManagementContext context)
        {
            GetUserGroups().ForEach(g => context.UserGroups.Add(g));
            context.SaveChanges();
        }

        private static List<UserGroup> GetUserGroups()
        {
            return new List<UserGroup>
            {
                new UserGroup { UserGroupName = "Admin", Roles = "Administration" }
            };
        }
    }
}
